﻿@model List<Lion.WeiXin.Core.Models.OrderModel>
@{
    Layout = "~/Views/Shared/_AppLayout.cshtml";
    List<Lion.WeiXin.Core.Models.OrderModel> list = Model as List<Lion.WeiXin.Core.Models.OrderModel>;
}
@section ChildPageJs {
    <script src="/Scripts/WeChat/WeChatProductMyOrder.js" type="text/javascript"></script>
}
<form id="fmSave" class="am-form">
     <div data-role="fieldcontain" data-mini="true">
        <input id="txtCode" type="text" placeholder="如果没有显示订单，请输入卡号"  />
    </div>
    <div data-role="fieldcontain">
    <ol id="olOrder" data-role="listview"  data-inset="true" data-filter="true" data-filter-placeholder="搜索订单" data-inset="true">
         <li id="liHeader" data-theme="b" data-role="list-divider">
                <h3>我的订单</h3>
            </li>
        @if (list.Count == 0)
        { 
            <li><a href="#">
                <h2>无记录</h2>
            </a></li>
        }
        else
        {        
            foreach (Lion.WeiXin.Core.Models.OrderModel item in list)
            {
            <li onclick="btnDel_click(this)">
                <input type="hidden" id="AID_@item.AID" name="AID" value="@item.AID"/>
                <a href="#" >
                    <p>订单:<span>@item.Code</span></p>
                    <p>总计:￥<span>@item.Total</span></p>
                    <p>购买日期：@item.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")</p>   
                    <p>状态：
                        @{if(item.IsPay==1)
                            { <span id="IsPay">完成消费</span>}
                            else
                            {
                             <span id="IsPay" style="color:red">已购买尚未消费</span>
                            }}
                    </p> 
                </a>
            </li> 
            }
        }
    </ol>
   </div>
    </form>
